added better logging and exporting env file to config file