[PATCH 2/2] gsn_restart file: set umask back to original after write failure