refactor partialfile