Solving deleted file problem