add safety check to documentation shell scripts