Implemented reading and creating a file.