add cleanup of temporary directory