Raise error if there are missing variables