Magnetic and structural properties of high coercivity nanocrystalline CoSm films with in-plane anisotropy