Catching the right exception so generating node file does not fail.