Return error on Close