Update version
Move fopen check to function; Add certificate file if available