fix bug when no kernel file