Fix spec
Spec refactoring
Support console exception