modified logic of delete temporary file. moved implementation
layer.(domain -> app)