moving error message to a resource file