adding checksum and bad block marking to generation step