Added exception logging to gelbooru script