Change to Popen

Popen wait added.