prepare environment at startup; helper for message boxes