Removing redundant set directory call