Fix bug in get_files