added tmp dir cleanup