log an exception, close the log file, then raise the exception

        Parameters
        ----------
        message : str
            the exception message

        Raises
        ------
            exception with message

def lraise(self,message):
        """log an exception, close the log file, then raise the exception

        Parameters
        ----------
        message : str
            the exception message

        Raises
        ------
            exception with message
        """
        s = str(datetime.now()) + " ERROR: " + message + '\n'
        print(s,end='')
        if self.filename:
            self.f.write(s)
            self.f.flush
            self.f.close()
        raise Exception(message)