Logging output of dat commands