added 'overwrite' flag to save_file action