rewrote log_monitor.pl