Don’t use defer Close() on writeable files

golang