Added str cast to error messages