Substantial rewrite, change 'good' var to []string to match 'txt', more generic chk() function
Fix regexp usage to proper function, change slice assignment
Fix bug, formatting