Add debugging.
Switch from command to code.