Logging now goes to correct level. Flushing named pipe before close