Refactored the creation of corrupted log into its own class for reuse.