try to fix sleep helper; implement send_file