add logs and rearrange the inits