add unit test for ftp manager
fix some minor problem
ftp manager has passed the unit test