Exiting the phantom process if an error occurs during render

Right now the child process will stay open forever.