diff --git a/main.cxx b/main.cxx
index df6df01c60dd62c2824b06df24e6e5d09fe0c7e2..eb5f06c30cdd2f2ef8a4796f577d14ebbe2a2a38 100644
--- a/main.cxx
+++ b/main.cxx
@@ -29,7 +29,11 @@ int main()
 
     proddb->queryCredentials();
     DatabaseClientResponse response = proddb->checkConnectivityAndCredentials();
-    if (response != Successful ) return response;
+    if (response != Successful ) {
+        cerr << "Connection to database failed because of error " << response << endl;
+        return response;
+    }
+    cout << "Connection successful!" << endl;
 
     return (-apdSerials.empty());
 }