auto create folders and save the file