Remove defective error handler and console.logs