Spot the mistake in changing the working directory on the FTP server:
ftp.changeWorkingDirectory("newDirectory");
No mistake; the code is correct.
The argument should be a full path, not just a directory name.
It's missing the confirmation check after changing the directory.
The method name is incorrect.