Connection to database is done the latest we can