Added additional error checking for passing through the file transfer data.