add error message on security check