Added a connection check to the startup process.