Close process when done (resolves #1)