replaced mkdir with dir.create