Notes on Hadoop
The "-output ~/output_path" *cannot* exist. Erase it before running.
If you return with an error code on error in your program on Hadoop, you run the risk of Hadoop killing everything. Better to simply return 0 and use the output to determine what was killed and what was not.