This has been heavily changed (and tested) in branch `robust_userlogs`.  Don't bother here.