Moved check temp dir again in costructor, more functional and manutenable