update bak_files function