file is now read but throws an error