Testing file modes are correct in Format.toString()