fix tie bug
usage, output file, verbose
add test