adding custom error messages in block mode