Write a Python function on paper to parse a log file, extract specific error codes, and return a dictionary with the frequency of each error.