Add ErrorMessage Function

not done yet