Better error targetting and print done at end