added routine which checks the save path