Handling of BOM files with search pattern for specific bytes