made some changes to logger and some bug fixes