Added function to spawn process in the background