validate protocol when passing -P and handle accordingly.

graceful exit means we have to pass failure upwards.