Experimental code to switch logfiles at midnight