Use iostream for saving GL program binary. Also check for GL_NUM_PROGRAM_BINARY_FORMATS > 0.