improve the way files are served, and fixed bug where prep config was not being written. #129