call admin.close() upon finish