Added some basic logging in functionality