Fixed logging to append to file as well as to stdout