Added function processIdWithCatch.