fixes path exists condition
creates env in a tmp dir and oo some code