add connection handling in def send_file
change flexa client from 'sequential' (xgh) to OO (or something near it)