Added auto clean support

After a job is done the output can be auto cleaned.