fix bug in logging unplanned outputs