log method

Added error logging to strip print statements out of other functions