Fixed a bug with fclose not working on the Xeon machine

- an error was due to the memory leak caused by allocating too little
memory for storying contents of files in strings