Improved logging of commands and batch execution.