changed os.path.dirname(__file__) --> os.getcwd() for the pi to work. All printing to console now happens with the logger.