Updated server code that works with file transfer.