How the heck do you corrupt the device file?!? Anyway... You could just use /proc/kernel_flash instead. It's part of the proc filesystem so it's automagically created.