db_files queries fixed