added error log reporting