[FIX] fixed problem where output iterators start at the end-of-file in f...

...iles opened with OPEN_APPEND mode