moved common code to fileserver