fixing problem to save and delete remote files