fix bug in file path replace