Remove unused import.
Catch exceptions "gracefully" in thread.
Kill unneeded values and rename thread.
Add possibility to pipe readers and writers.