init code

log and pic process