adds function to check for module
first working version of logging in