fixed NPE when OnlineWriter preparation failed.