adding wait after start to check for pid