make scan_forward in flog0 a tail call;

flush stream when dumping