rm unused functions
add exit when OS unknown