Fixing unnecessary directory creation