implemented file reading part of the upload manager