refactor(main) sendFile