Finished the dump_file function.