Fixed bugs in the console command file that were stopping it from working.

There was an extra `end` and an extra `)`