Use subprocess call instead of Popen to get rid of sleep.