Improve logging for histogram jobs

Also fix misplaced try statements