write_file added