More graceful implementation of app.CloseDBConnection()