Remove console
Add connection error handling
Error handling.