Rewrites track-errors and writes test.