file fixes, misc improvements.
basic test. print_latency.