Attempt at printing lines handling error