cleaning up duplicate methods

cleaning up check on mktemp