Updated code for file transfer plugin