log when running a command.
few missing files. Really need tests now. :(