change directory on compile step
added support for last used log id