Add debug mode for connection script