More sanity checks before writing SDCARD

Signed-off-by: Gianpaolo Macario <gianpaolo_macario@mentor.com>