Thermal stability of ionic liquid in confined geometry