Rewrite the test file