fixed some stdout issues; added script for easy checking