Print error message instead of stack.
Fix function check.