Minor change. Added try/catch for persisting dependencies