fixed error reporting to include file name