Added file cleanup and deletion of temporary file

Reviewer: Dan V (post commit)

Issue: GCP-9457