code: protected function throwException( $msg ) {
  		if ( $this->handle ) {
  			fclose( $this->handle );
  			unlink( $this->tmpFileName );
  		}
  		throw new Exception( $msg );
  	}
docs: Clean up the temp file and throw an exception
  
  @param string $msg
  @throws Exception