Updated add word to return error code on bad word