Adding capture_exception option