Updating proc_open logic