Added error messages to comments