make error logging synchronous
wait for log being fully written prior to process exit