Fixed bug when module is disabled
Added another option for logging exceptions