integer comparisons required
validation before writing temp file