added altDir support