add some waits; clean up temp files