fix for the case that pattern file format is not correct