Fix the Latex tests using the new backend type
Use writeFileRep in the new backend type too