fix logger resource deallocation
fix parameter order