Fixed errors with scanf and fscanf returning the number of parameters filled.