Adding file creation, but file opening not working