split test functions; add tracing to file