There were issues with creating directories for the chain and figure. Fixed.