use g_basename rather than basename