Add a rescue for the failure callback, and fix some deprecated spec calls.