added flag to error message