Write Cache to disk if an exception occurs while processing the Environment - fix #4