small if/else fix for creating new directory