Corrected sprintf to print line as an integer