Error Catching

Added error catching for ports