force saving log when error happens