modify checkcert,no need to make a temp dir