Added option to retain temporary files