added java temp dir path, removed working dir when split fails