RAW_DATA_FILES can now be a string (if there's only one DAT file).
The log file is now closed at the end of the script.