gc: improve handling of errors reading gc.log