testCase now writes to a file