Small features

Fixed chopping, added rng, added file output