added a check to prevent flooding log with parser errors