Write the values to the file
Add linebreak separator in 'cat' statement
Add linebreak separator in 'cat' statement
Use 'format' function instead of 'prettyNum'