Reorder logging output and actual commands