added StandardError rescue block
removed stupid puts statements