added output and log