fixing fileTransfer sample

2nd attempt

Discovered a timing issue in the existing sample with the FileTransfer API.  Although not a perfect solution, this change does fix the current problem.