Small refactoring preparing to add confirmation for file send.