Logger writes to file & some bugs fixed