some fixes to file serving