added error logger