fix config file loading, fix makefile compile errors