Updated temp file management.