addressing coverity warnings: now checking return value of fscanf