tail log function added