Fix. Failed download when specify a directory.