add basic diagnostic logging (to file) to send.py