added more functions for handler errors in modules