Bug fixes for file handling and documentation.
Better random number generation for uniform distributions
Wrap file streams opens with try/catch blocks

For clean up cluster files in case opening a file throws
some exception.