writes found links to text file (fixed encoding bug)