Added unit test and logger