Removed unused import.
Added deletion of temp file.