refactoring to make logging tests shorter
re-added command counter which is needed by the logfiles on remote hosts