print file in error messages, too

and move it to the end of the message, like Perl does