-moved static function so it makes more sense
-correct count of file parsed
-moved a function
-adpated error msg
-modified a function declaration
-modified error message
-added a static function
-proper closing of error stream added
.
-added an error log
-will create a log file and append error that occured to it