updating paths and adding rm for files