change mkdirSync back to mkdir