add command finish to close conection