better structure for the visiting of file objects