change creating tempfile on common file for cache