THANK YOU for pointing this out! I'm new to modding, and I just couldn't spot where the problem was. It's an interesting bug, though - it seems to make most of the game interface fail, and even the KSP.log can fail to be written. All of which, of course, made it a bit difficult to figure out. And thanks to MrHappyFace for the original code! This is perfect for what I'm trying to do.