re-arranged clean_files