update cleanup script for java