added error log call