Change writing event to reduce the use of gconf object