replace the root file path to compress file path just once