added option for output direcory in cpu