Fix bug #3 log directory not chagned after midnight