Added validation of command-line arguments to connections.py