Added error handling to function startPhantom. Closes #13