Set file attribute after open_*_log call, fix typo in SetFilePointer call