added umask(0) to make sure mode works when using mkdir