def logger(msg):
    """ Common method for writing debug information in a file """
    msg = str(msg)
    if not msg.endswith('\n'):
        msg += '\n'
    try:
        fh = open('report.log', 'a')
        fh.write(msg)
        fh.close()
    except Exception:
        pass
