added description of log appending inside def