fix directory not being created