generate pidfile use g_file_set_contents