replaced glib function calls to g_file_get_contents()