fix infinite loop when failing to connect
ignore .tags
add echo example program