remove useless logs function and update log function