Replaced spawn with exec to support Windows as well as Linux