Make it the same as write_file and create_dir