Avoid checking writability at a different step from actually writing the file, to avoid race conditions; just use the return value of `touch`.