logging done on close of file not on rotation