rotate logs fix to run once