use ccatch/3 to replace catch/3 works around SWI specific bugs when using /0 and block/3