added timer and output file