added better logging and passing env file to config