changed [-f XXX] to more traditional if then structure so set -e does not catch error