opening log file sooner during initialization and writing most initialization errors and warnings to log instead of stderr