Added -l option, logs all stdout/stderr to a logfile.
Fixed registered modules outputting to stderr.