use instead of require
fix usage message
fix usage message
if there isn't any $log_fh specified, use STDOUT
close all open filehandles that need to be closed.