Added support for FileEntities to downloadEntity and uploadFile