def tail_logfile(logfile=''):
    """Read n lines of the logfile"""
    result = "Can't read logfile: {}".format(logfile)
    lines = 40
    with open(logfile) as f:
        # for line in (f.readlines()[-lines:]):
        #     print(line)
        result = ''.join(f.readlines()[-lines:])
    return result