Switched to production mode. Added error handler