added error handler
broken flash