Try setting up logfile early