output to directory