Code supports full reading of file which means if there is a line without a number it sums zero and continues the iteration.
Test file added.
Text Files are used for test purposes.