Fixing error messages for tests to pass in Mono.

make sure to take out writelines before merging