Trying to fix wonky import and write issues with PDF Templates