Worked on fixing file io