Fix/refactor _get_files()