add exception handling around console execution