Added flash memory testing code