fixed stack pointers for all important modes
improved logger