Prefer call to closeQuietly() here if possible, eliminates the null check