Check file write result (removes compiler warning)