clear stat cache in logger to avoid cache of file state

fixes #2988