Sort headers when saving to debug log

Change-Id: Ibc41e10f92934465ee013f17854ada500db25667
Merge "Sort headers when saving to debug log"