try-catch for debug