Improved query for files by investigation