removed check dir && exit 1 conditional