Moves file sending logic into SendResponse method