Add print line to program which is segfaulting