Example program has been changed to allow reading commands from file