Before we raise the error. We also need save the dump or core file to our logs.