append console.log to error and close events