reworking threaded file input