move send_data_file into separate function
cleanup