add logging and command execute functions