Modified logging behaviour. Specifying a logfile now writes to the file in parallel, rather than replacing sys.stderr outright.