changed .createNewFile() to mkDir() should fix errors