prevents duplicate log output by checking if an instance of the log handler has already been added