Catch and log errors while parsing logs