Open 2-pass logfile in binary mode for both reading and writing.