Moved the file reading to the main script in order to facilitate the reading of the file type by the individual script
Fixed merge problems???