try/catch for node file