added console output for error