I fear it will be difficult to achieve what the docs are promising: sending error messages to both screen and log file. As soon as you do the multiplexing in the tee function you will likely sacrifice that the order of out and err messages in the log file are in correct temporal order.