added code for reading ini file and writting log