split encryption and file output to different threads