Check permissions and job state before overwriting logs