Minor gofmt, and moved a .Close() up to a defer