Fix command logging