Added bufsize out param to get_resource calls