Added error handling for crashed Ruby process