It may have been an issue with the API server, I'm not sure. Earlier when I was doing it, I would get an error concerning the token_id of a given token which had not yet been turned on/off (but had already had the drawer applied to it from earlier versions). I would then receive an error from the API server saying the database had been corrupted, and it was resetting. The error was random, in that sometimes it occurred, sometimes it didn't. Now, it doesn't seem to be happening, which leads me to believe it was probably the API server itself, rather than the script.