Programming flow and timeouts

* Add reset and sync for each failed attempt
* Recover from timeouts (some of the time)