fclose should leave the file descriptor position after the last read or written byte.
mentioned in commit 82c93820