changed permission in mkdirCheck