flashlight error handler added