files.py - updated list_files function