Putting temp dir in a more appropriate place; enhancing debug printout