redirect output and store as artifact