Fixed file query to use folder_id field