add libdir
read the port and env from config file