Adds more error handling and attempt to better manage failures that occur during the prepare phase.

1 file changed