added filename concept to error reporting