cleaning up duplicate method
cleaning up check on mktemp