Remove useless code ralated to output directory