added close() statements!