FIX: CHanged popen.poll() to popen.returncode in threads