added bit of code to delete temp file