delete temp file and change to relative path