The getFiles method does not return correct results when used in the success event. If you upload a file, the method in the success event will return an array with one item. If you remove a file, the same would return again an array with one item.
GetFiles returns an array with one item after removing the file from the list.
The method should return an empty array.