Fixed issue with logging recording duration when handling the STOP command