Added Dir support. Minor error support when creating New instance of the client