Check if the 'mockfile' exists before trying to open it