Ensure connectivity and add dry run option