Fixed faulty fprintf statement that was messing up cmdStr.