Added stream_wrapper_exists check