added error to logging