added exception handling to all modules