Make setBaseDirectory a static method