waiting for end of each remote command