normalizing paths and throwing an error