Rewrite storage module to be more fault-tolerant (bug 903984)