Function for writing a level map to a file. More comments. Renamed parse_file to read_file