added download and upload functions for retrieving file contents