Better error reporting with custom messages