Extractor was created and destroyed within the if scope, leading to a dereference error when trying to call the virtual writer methods.