fix: files were not being uploaded properly. update file size as files are written