How can a closing transaction in LN have more than 2 outputs? I collected some data regarding closing transactions of channels in LN and I see that a small percentage of them have more than two outputs. How is this possible?

An example of such closing transaction type:
1235c0196785ea2e538fb5f3e45caeb17fc457c089a9f4a4bb01f1221539159a
There are 3 ways to close a channel.


The good way: mutual close
The bad way: force close
The ugly way: revoked close with penalty transaction


In the good case the closing tx should have 2 outputs as you expected. In rate cases even just 1 output. 

But in the other two cases a version of the commitment transaction is published. The commitment transactions has additional outputs for pending htlcs that are not settled or timed out yet. So if the channel was routing funds and a force close or protocol breach is happening we can see more than two outputs.