added error log