better file processing to prevent false positives