Working on the file handling

See title