small bug fixing + smarter directory creator