Don't create temporary file unless required