log function added

def logWrite