Seems good - just one thing:

If I'm not mistaken you shouldn't rescue `Exception` and use `StandardError` instead - otherwise stuff like hitting `ctrl+c` or running `kill $PID` won't quit the program.