Fix order by clause in worker trigger history model. Improve logging in models.