Added creation of temp file for matplotlib library outputs