Found a race condition in command line code, currently working on protecting it with a semaphore.