replaced Reader exit calls with something a little more graceful