added some backup directory checks