sub log_msg { my ($FH, $msg, @args) = @_; print $FH $msg, @args; }