Display type and name of file in error messages