Set tmp path
Refactor unit tests