Move config to core. Move timezone setting to config. Add basic error handling.
Move startup chdir to correct place.