If pitstop returns an error, add a fallback to do PDF cropping etc. via this script: https://github.com/macmillanpublishers/utilities/blob/master/crop_pages.rb