Added output file cleanup (useful in case of error during process, prevents old files)