Make vanirflash more robust

Change-Id: Ic887f119252f4c74ce6fa47dda2c3eb13803d357