213 is quite large for a midi file. I wouldn't be surprised if you running out of memory.

Also check if the sequencer has a requirement that the midi file be saved as a type 0 or type 1. That could give you an error.

Not familiar with the Korg N series.. good luck!