Made output file name configurable. Also ensured that the file is generated in the same folder of the configuration file.