Removed useless close/open cycle from example