working on startup, catch connection and retry