modified RTH to log write errors instead of panic