Added argument to just print the current mode and fixed some other issues