Make display log function work