public void CreateDirectory(Message message, int opID) {
		String filepath = message.filePath;
		System.out.println("Trying to create file path: "+ message.filePath);
		if (!NamespaceMap.containsKey(filepath)) { // directory doesn't exist
			if(AddExclusiveParentLocks(filepath, opID))
			{
				File path = new File(filepath);
				String parentPath = path.getParent();
				String parent;
				if (parentPath == null) {
					parent = filepath;
				} else {
					parent = parentPath;
				}
				for(int r=0;r<10;r++){
					if (!NamespaceMap.containsKey(parent) && !(parent.equals(filepath))) {
						// parent directory does not exist
						System.out.println("Parent directory doesnt exist");
						if(r<9){
							continue;
						}
						SendErrorMessageToClient(message);
						return;
					} else if (NamespaceMap.containsKey(parent)) {
						NamespaceMap.get(parent).children.add(filepath);
						break;
					}
				}

				NamespaceNode newNode = new NamespaceNode(nodeType.DIRECTORY);
				NamespaceMap.put(filepath, newNode);

				SendSuccessMessageToClient(message);
				tfsLogger.LogMsg("Created directory " + filepath);
				//System.out.println("Creating direcotry " + filepath);
				//WritePersistentNamespaceMap(filepath, newNode);

				System.out.println("OPID " + opID + " Finished");
			}
			/*else
			{
				SendErrorMessageToClient(message);
			}*/

		} else // directory already exists
		{
			SendErrorMessageToClient(message);
		}

		synchronized(NamespaceMap)
		{
			ClearNamespaceMapFile();
			for(String key : NamespaceMap.keySet())
			{
				WritePersistentNamespaceMap(key, NamespaceMap.get(key));
				//System.out.println("Key: " + key);
			}
		}

	}