Fix endpoint
Add debug statements for showing connection process