Logging now outputs to correct file