Log closing & mode fprintf