It was failling with the shutdown command - "Error deleting port forwarding rule"
put null for required variables
the script was exited with fail, even if it was in the desired state
correct the root cleaning sequence (rm exit 1 if nothing to delete)