added tryCatchDebug helper function