Refactored logwatch module and added functionality