support for reading ENV file and better job at figuring out plugin dir