add autostart script
some bug fix.
add two files