Move defer reader.Close() to ListObjects().