Adding logging to figure out PDF generator problems